package com.geek.factory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geek.factory.entity.Role;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-06-24
 */
public interface RoleMapper extends MPJBaseMapper<Role> {
    @Select("select r.* from role r join user_role ur on r.id = ur.role_id where ur.user_id=#{userId}")
    public Set<Role> selectRoleByUserId(Integer userId);
}
